<template>
	<cl-crud>
		<zm-table :data="list" :columns="columns" :context-menu="[]" :auto-height="false">
			<template #column-detail="{ scope: { row } }">
				<div v-if="row.detail">{{ row.detail }}</div>
				<div v-else>无</div>
			</template>
			<!-- <template #column-images="{ scope: { row } }">
				<div v-if="row.images.length > 0">
					<el-image
						v-for="(item, index) in row.images"
						:Key="index"
						style="width: 40px; height: 40px;margin-right: 10px"
						:src="`${item}?x-oss-process=image/resize,limit_0,m_fill,w_40,h_40`"
						:preview-src-list="[item]"
					>
					</el-image>
				</div>
				<div v-else>无</div>
			</template> -->
		</zm-table>
	</cl-crud>
</template>
<script>
export default {
	inject: ["parent"],
	props: {
		detail: {
			type: Object,
			default: () => ({})
		}
	},
	components: {},
	data() {
		return {
			list: [],
			columns: [
				{
					label: "预约时间",
					prop: "appoint_time",
					align: "center"
				},
				{ label: "内容详情", prop: "detail", align: "center", showOverflowTooltip: true },
				{
					label: "预约门店",
					prop: "dept_name",
					align: "center",
					showOverflowTooltip: true
				},
				{
					label: "预约时长",
					prop: "cart_duration",
					align: "center",
					showOverflowTooltip: true
				},
				{
					label: "预约项目",
					prop: "projects",
					align: "center",
					showOverflowTooltip: true
				},
				{
					label: "操作用户",
					prop: "user_name",
					align: "center",
					showOverflowTooltip: true
				},
				{
					label: "操作时间",
					prop: "created_at",
					align: "center",
					showOverflowTooltip: true
				}
			],
			accountsVisible: false,
			form: {
				cart_id: "",
				appeal_detail: "",
				appeal_images: ""
			}
		};
	},
	computed: {},
	methods: {
		async init() {
			const { cus_id, biz_id } = this.detail;
			const data = await this.$service.cart.amendRecode({
				cus_id
			});
			this.list = data;
		}
	}
};
</script>
